package com.chuangjiangx.member.manager.client.web.stored.request;

import com.chuangjiangx.member.stored.ddd.domain.model.MbrUniformOrderType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * @author cj-ch
 * @date 2018/4/4 下午2:50
 */
@Data
@ApiModel(value = "会员统一下单请求参数")
public class MbrUniformOrdersRequest {

    /**
     * 下单类型
     */
    @ApiModelProperty(value = "下单类型")
    @NotNull(message = "下单类型不能为null")
    private MbrUniformOrderType type;

    /**
     * 卡券核销码
     */
    @ApiModelProperty(value = "卡券核销码")
    @Size(min = 13,max = 13,message = "卡券核销码长度为13位")
    private String couponCode;

    /**
     * 储值规则Id
     */
    @ApiModelProperty(value = "储值规则Id")
    private Long rechargeRuleId;
    private Long rechargeMemberId;

    /**
     * 订单金额
     */
    @ApiModelProperty(value = "订单金额")
    @DecimalMin(value = "0.01",message = "订单金额不能小于0.01元")
    private BigDecimal amount;
}
